<template>
	<view class="page">
		<view class="group_3">
			<!-- <view class="" style="margin: 20rpx 0 0 20rpx;">
				基本信息
			</view> -->
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">选择校区 </text>
				<view class="item">
					<input type="text" placeholder="请选择校区 " disabled v-model="userInfo.occupation_relation"
						class="atinput" style="width: 400rpx;text-align: right;" @click="showoccupation = true" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">选择课程</text>
				<view class="item">
					<input type="text" placeholder="请选择课程 " disabled v-model="userInfo.occupation_jineng"
						class="atinput" style="width: 400rpx;text-align: right;" @click="showjineng = true" />
				</view>
			</view>

			<view class="d-flex flex-row justify-space-between" v-if="status == 1">
				<text lines="1" class="text_8">选择计划</text>
				<view class="item">
					<input type="number" disabled placeholder=" 请选择计划" class="atinput" v-model="resultString"
						@click="addtrain" style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between" v-if="resultString!=''">
				<text lines="1" class="text_8">班级名称</text>
				<view class="item">
					<u-alert type="warning" :closable="closable" :description="description"></u-alert>
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between" v-if="resultString==''">
				<text lines="1" class="text_8">班级名称</text>
				<view class="item">
					<input type="text" placeholder="请输入班级名称" class="atinput" v-model="class_name"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<text lines="1" class="text_8">班级类型</text>
			<view class="item">
				<view class=" week-list flex-wrap">
					<view class="week-item" :class="{'active':item.id == EnumListId}"
						v-for="(item,index) in trainEnumList" :key="index" @click="EnumListSelect(item,index)">
						{{item.name}}
					</view>
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">满班人数</text>
				<view class="item">
					<input type="number" placeholder=" 30（默认0为不限制学员数量）" class="atinput" v-model="student_num"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">课时参考单价</text>
				<view class="item">
					<input type="number" placeholder=" ￥200（默认0）" class="atinput" v-model="refer_hour_price"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between" v-if="resultString==''">
				<text lines="1" class="text_8">主教练</text>
				<view class="item">
					<input type="text" placeholder="请选择主教练 " disabled v-model="userInfo.occupation_coach_name1"
						class="atinput" style="width: 400rpx;text-align: right;" @click="showcoach_name1 = true" />
				</view>
			</view>
			<view class="" v-if="resultString==''">
				<text lines="1" class="text_8">助教</text>
				<view class="item">
					<view class=" week-list flex-wrap">
						<view class="week-item" :class="{'active': coach_nameSelect.includes(item.id)}"
							v-for="item in coach_nameList" :key="item.id" @click="handcoach_name(item)">
							{{ item.coach_name }}
						</view>
					</view>
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between" v-if="resultString!=''">
				<text lines="1" class="text_8">主教练</text>
				<view class="item">
					<u-alert type="warning" :closable="closable1" :description="description1"></u-alert>
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between" v-if="resultString!=''">
				<text lines="1" class="text_8">助教</text>
				<view class="item">
					<u-alert type="warning" :closable="closable2" :description="description2"></u-alert>
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">上课教室 </text>
				<view class="item">
					<input type="text" placeholder="请选择上课教室 " disabled v-model="userInfo.occupation_classroom_name"
						class="atinput" style="width: 400rpx;text-align: right;" @click="showclassroom_name = true" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">上课时间 </text>
				<view class="item">
					<input type="text" placeholder="请输入上课时间 " v-model="class_time" class="atinput"
						style="width: 400rpx;text-align: right;">
				</view>
			</view>

		</view>
		<view class="group_3">
			<view class="" style="margin: 20rpx 0 0 20rpx;">
				课时提醒
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">课时不足提醒 </text>
				<view class="item">
					<input type="number" v-model="not_enough_hour" class="atinput"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">最多请假次数 </text>
				<view class="item">
					<input type="number" v-model="max_leave_num" class="atinput"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">缺勤次数预警 </text>
				<view class="item">
					<input type="number" v-model="absence_num_warning" class="atinput"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
			<view class="d-flex flex-row justify-space-between">
				<text lines="1" class="text_8">请假次数预 </text>
				<view class="item">
					<input type="number" v-model="leave_num_waring" class="atinput"
						style="width: 400rpx;text-align: right;" />
				</view>
			</view>
		</view>
		<view class="group_3">
			<view class="" style="margin: 20rpx 0 0 20rpx;">
				扣课设置
			</view>
			<text lines="1" class="text_8">消课模式</text>
			<view class="item">
				<view class=" week-list flex-wrap">
					<view class="week-item" :class="{'active': jiaoSelect.includes(item.id)}" v-for="item in weekList"
						:key="item.id" @click="handjiao(item)">
						{{ item.name }}
					</view>
				</view>
			</view>
			<text lines="1" class="text_8">缺勤是否扣课</text>
			<view class="item">
				<view class=" week-list">
					<view class="week-item" :class="{'active':item.id == selectId1}" v-for="(item,index) in timeList1"
						:key="index" @click="timesSelect1(item,index)">
						{{item.name}}
					</view>
				</view>
			</view>
			<text lines="1" class="text_8">请假是否扣课</text>
			<view class="item">
				<view class=" week-list">
					<view class="week-item" :class="{'active':item.id == selectId2}" v-for="(item,index) in timeList2"
						:key="index" @click="timesSelect2(item,index)">
						{{item.name}}
					</view>
				</view>
			</view>
		</view>


		<view class="" style="width: 100%;height: 10vh;"></view>
		<view class="d-flex flex-row justify-space-between justify-center align-center"
			style="position: fixed;bottom: 0;height: 120rpx;background-color: #fff;width: 100%;padding: 0 8%;z-index: 99;">
			<view class=""
				style="width: 45%;height: 80rpx;background: #ffffff;color: #ec652b;font-size: 24rpx;text-align: center;border-radius: 35rpx;line-height: 80rpx;border:#ec652b 1rpx solid">
				取消
			</view>
			<view class="" @click="addculum1" v-if="resultString==''"
				style="width: 45%;height: 80rpx;background: linear-gradient(0deg, rgba(214, 53, 53, 0.9), rgba(255, 64, 64, 0.93), rgba(250, 142, 142, 0.93));color: #ffffff;font-size: 24rpx;text-align: center;border-radius: 35rpx;line-height: 80rpx;">
				保存信息
			</view>
			<view class="" @click="addculum2" v-if="resultString!=''"
				style="width: 45%;height: 80rpx;background: linear-gradient(0deg, rgba(214, 53, 53, 0.9), rgba(255, 64, 64, 0.93), rgba(250, 142, 142, 0.93));color: #ffffff;font-size: 24rpx;text-align: center;border-radius: 35rpx;line-height: 80rpx;">
				保存信息
			</view>
		</view>
		<u-picker :show="showoccupation" :columns="occupation_status" keyName="venue_name" @confirm="addoccupation"
			@cancel="showoccupation = false">
		</u-picker>
		<u-picker :show="showcoach_name1" :columns="coach_name1_status" keyName="coach_name" @confirm="addcoach_name1"
			@cancel="showcoach_name1 = false">
		</u-picker>
		<u-picker :show="showcoach_name2" :columns="coach_name2_status" keyName="coach_name" @confirm="addcoach_name2"
			@cancel="showcoach_name2 = false">
		</u-picker>
		<u-picker :show="showclassroom_name" :columns="classroom_name_status" keyName="classroom_name"
			@confirm="addclassroom_name" @cancel="showclassroom_name = false">
		</u-picker>

		<u-picker :show="showjineng" :columns="jineng_status" keyName="course_name" @confirm="addjineng"
			@cancel="showjineng = false">
		</u-picker>
		<u-popup @touchmove.stop :show="EliminatioPopup" @close="EliminatioPopup = false" closeOnClickOverlay
			mode="center" :safeAreaInsetBottom="false" round="15" >
			<view class="tab-filter" style="font-size: 30rpx;text-align: center;margin-top: 20rpx;">
				<text>选择计划</text>
			</view>
			<scroll-view class="storepopup" style="height: 60vh;padding: 20rpx 20rpx;width: 660rpx;" scroll-y>
				<view class="scroll-view_H" scroll-y="true">
					<checkbox-group shape="circle">
						<label class="item " v-for="(item, index) in studentList" :key="index"
							@click="radioChecked(index, item)">
							<view class="flex-between" style="margin-bottom: 20rpx;">
								<view class="flex-align">
									<u--image width="50" height="50" :src="item.cover">
									</u--image>
									<view class="info">
										<view class="name">{{ item.name||'' }}</view>
										<view class="name" style="margin-top: 10rpx;"><text>编号:{{ item.id }}</text><text
												style="margin-left: 10rpx;">教练{{ item.coach_name || '' }}</text> </view>
									</view>
								</view>
								<view class="radioBox" style="padding-left: 34rpx">
									<checkbox color="#2f75fa" :value="item.id" :checked="item.checked"
										:disabled="item.disabled" />
								</view>
							</view>
							<view class="d-flex flex-row align-center"
								style="margin-bottom: 30rpx;background-color: rgb(253,246,236);padding: 10rpx;color: #000000;">
								<view class="d-flex flex-row" style="margin-left: 20rpx;">
									<view class="" style="font-size: 22rpx;">
										规格：{{item.sku_name||''}}
									</view>
								</view>
							</view>
						</label>
					</checkbox-group>
					<view style="width: 100%;height: 130rpx;"></view>
				</view>
			</scroll-view>
			<view class="enroll-detail-footer">
				<view class="footer " style="padding: 20rpx;">
					<view class="" style="display: flex;flex-direction: row;">
						<button type="default" @click="offclasses"
							style="width: 170rpx;height: 70rpx;font-size: 26rpx;background-color: #d0d0d0;color: #ffffff;">取消</button>
						<button type="default" @click="onclasses"
							style="width: 170rpx;height: 70rpx;font-size: 26rpx;background-color: #4786fe;color: #ffffff;">确认添加</button>
					</view>

				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	const train = require("@/api/train/index.js");
	import {
		formatDate
	} from "@/utils/util.js"
	export default {
		data() {
			return {

				fileList1: [],
				url_phone: '',
				fileList: [], //图片列表
				show: false,
				value1: Number(new Date()),
				showoccupation: false, //职业
				occupation_status: [], //职业
				occupation_list: [{
						id: 1,
						label: "游泳私教初级课程"
					},
					{
						id: 2,
						label: "篮球长训高级课程"
					},
				],
				showjineng: false, //技能等级
				jineng_status: [], //技能等级
				userInfo: {
					occupation_relation: '',
					occupation_relation_id: '',
					occupation_jineng: '',
					occupation_jineng_id: '',
					occupation_changguan: "",
					occupation_changguan_id: "",
					occupation_xcx: '',
					occupation_xcx_id: '',
					timescount: 1,
					datacount: 1,
					data_time: '',
					course_mode_type: '',
					occupation_coach_name1: '',
					occupation_coach_name_id1: '',
					occupation_coach_name2: '',
					occupation_coach_name_id2: '',
					occupation_classroom_name: '',
					occupation_classroom_name_id: '',
				},
				coach_name1_status: [],
				coach_name2_status: [],
				classroom_name_status: [],
				showcoach_name1: false,
				showcoach_name2: false,
				showclassroom_name: false,
				day_limit: '',
				value: 0,
				datashow: false,
				mode: 'range',
				checkboxValue1: [],
				// 基本案列数据
				checkboxList1: [],
				weekSelect: [], //选中的
				formData: {
					className: '', //私教课程名称
					classItem: '', //课节,
					startDate: '', //预约日期开始
					endDate: '', //预约日期结束
				},
				dateState: 0, //0是选择开始日期，1是结束日期
				showDate: false, //年月日弹窗
				content: '',
				subTineList: [ //预约时间段
					{
						course_item_name: '',
						hour_num: '',
						course_price: '',
						course_period: '',
						week_limit: '7',
						month_limit: '31',
						course_extra_num: '',
					}
				],
				subTineList2: [ //预约时间段
					{
						course_item_name: '',
						course_period: '',
						course_price: '',
						week_limit: '7',
						month_limit: '31',
						hour_num: '',
					}
				],
				venue_id: '',
				weekList1: [],
				jineng_list: [],
				weekList: [],
				jiaoSelect: [], //选中的
				selectlist: {},
				item_id: '',
				status: '',
				studentList: [],
				applicantlist: [],
				applicant: '',
				students: [],
				EliminatioPopup: false,
				resultString: '',
				description: '选择计划后，班级名称会根据计划名称加班级数量自动生成！！！',
				closable: true,
				description1: '选择计划后，主教练会采用计划自身的教练，如果创建计划是未配置教练，则在班级创建后到班级主页中进行教练配置！！！',
				closable1: true,
				description2: '选择计划后，助教需在班级创建后到班级主页中进行助教配置！！！',
				closable3: true,
				timeList1: [{
						name: '是',
						id: 1
					},
					{
						name: '否',
						id: 2
					}
				],
				timeList2: [{
						name: '是',
						id: 1
					},
					{
						name: '否',
						id: 2
					}
				],
				trainEnumList: [],
				EnumListId: '',
				class_time: '',
				student_num: '',
				refer_hour_price: '',
				not_enough_hour: 0,
				max_leave_num: 0,
				absence_num_warning: 0,
				leave_num_waring: 0,
				selectId1: '',
				selectId2: '',
				coach_nameList: [],
				coach_nameSelect: [],
				class_name: '',
				train_enum_id: '',
				train_ids: [],
				assclassroom_id:'',
				id:''
			}
		},
		onLoad(options) {
			console.log(options, 'options')
			this.venue_id = options.venue_id
			this.status = options.status
			if (options.status == 2) {
				const selectionArrs = JSON.parse(decodeURIComponent(options.selectionArr))
				console.log(selectionArrs, 'selectionArrs222')
				this.selectlist = selectionArrs
				this.userInfo.occupation_relation = selectionArrs.area_name
				this.userInfo.occupation_relation_id = selectionArrs.area_id
				this.userInfo.occupation_jineng = selectionArrs.course_name
				this.userInfo.occupation_jineng_id = selectionArrs.course_id
				this.class_name = selectionArrs.class_name

				this.cls_config()
				this.student_num = selectionArrs.student_num
				this.refer_hour_price = selectionArrs.refer_hour_price
				// this.coach_nameSelect = [selectionArrs.assistant_coach_ids]
				const strArray = selectionArrs.assistant_coach_ids
				// 过滤掉空字符串，并将剩余的字符串转换为数字
				const numArray = strArray.filter(str => str).map(str => parseInt(str, 10));
				console.log(numArray);
				this.coach_nameSelect = numArray
				
				 this.userInfo.occupation_coach_name1 = selectionArrs.coach_name
				 this.userInfo.occupation_coach_name_id1 = selectionArrs.coach_id
				 
				 this.EnumListId = selectionArrs.train_enum_id
				
				this.assclassroom_id = selectionArrs.classroom_id
				this.userInfo.occupation_classroom_name_id = selectionArrs.classroom_id
				this.class_time = selectionArrs.class_time
				this.not_enough_hour = selectionArrs.not_enough_hour
				this.max_leave_num = selectionArrs.max_leave_num
				this.absence_num_warning = selectionArrs.absence_num_warning
				this.leave_num_waring = selectionArrs.leave_num_waring
				const strvenue_id = selectionArrs.course_consume_mode.trim().split(',');
				// 过滤掉空字符串，并将剩余的字符串转换为数字
				const numstrvenue_id = strvenue_id.filter(str => str).map(str => parseInt(str, 10));
				console.log(numstrvenue_id);
				this.jiaoSelect = numstrvenue_id
				
				this.selectId1 = selectionArrs.absence_deduct
				this.selectId2 = selectionArrs.leave_deduct
				this.id = selectionArrs.id

			}
			this.cls_options()

		},
		methods: {
			EnumListSelect(item, index) {
				this.EnumListId = item.id
				this.train_enum_id = item.train_enum_id
			},
			timesSelect1(item, index) {
				this.selectId1 = item.id
			},
			timesSelect2(item, index) {
				this.selectId2 = item.id
			},
			radioChecked(index, item) {
				this.applicantlist = []
				item.checked = !item.checked
				this.selectLength = this.studentList.filter(item => item.checked).length || 0
				console.log(this.selectLength)
				this.studentList.forEach((el, idx) => {
					if (el.checked) {
						this.applicantlist.push(el.id)
					}
				})
				this.applicant = this.applicantlist.toString()
				console.log(this.applicant, 'this.applicant')
			},
			offclasses() {
				this.EliminatioPopup = false
			},
			addtrain() {
				this.EliminatioPopup = true
				this.train_options()
			},
			async onclasses() {
				this.students = [];
				this.studentsname = [];
				const resultArray = [];
				this.train_ids = []
				this.studentList.forEach((item) => {
					if (item.checked == true) {
						this.students.push(item);
						this.studentsname.push(item.name);
						resultArray.push(`${item.id}-${item.name}`);
						this.train_ids.push(item.id)
					}
				});
				this.resultString = resultArray.join(' || ');
				console.log(this.resultString ,'this.resultString ')
				this.EliminatioPopup = false


			},
			async train_options() {
				let params = {
					area_id: this.userInfo.occupation_relation_id,
					course_id: this.userInfo.occupation_jineng_id,
				};
				let res = await train.train_options(params);
				if (res.code == 1) {
					this.studentList = res.data.list
				} else {
					uni.$u.toast(res.info)
				}
			},
			async addculum1() {
				if (this.student_num == '') {
					this.student_num = 0
				}
				if (this.refer_hour_price == '') {
					this.refer_hour_price = 0
				}
				let params = {
					venue_id: [this.venue_id, this.userInfo.occupation_relation_id],
					course_id: this.userInfo.occupation_jineng_id,
					train_ids: [],
					class_name: this.class_name,
					train_enum_id: this.train_enum_id,
					absence_deduct: this.selectId1,
					absence_num_warning: this.absence_num_warning,
					assistant_coach_ids: this.coach_nameSelect,
					class_time: this.class_time,
					classroom_id: this.userInfo.occupation_classroom_name_id,
					coach_id: this.userInfo.occupation_coach_name_id1,
					course_consume_mode: this.jiaoSelect.map(item => [item]),
					leave_deduct: this.selectId2,
					leave_num_waring: this.leave_num_waring,
					max_leave_num: this.max_leave_num,
					not_enough_hour: this.not_enough_hour,
					refer_hour_price: this.refer_hour_price,
					student_num: this.student_num,
					id:this.id 
				};
				console.log(params, 'paramsparams')
				let res = await train.cls_mangesave(params);
				if (res.code == 1) {
					uni.$u.toast(res.info)
					setTimeout(() => {
						uni.navigateBack({
							delta: 1 // 返回上一页面，如果页面栈中只有一个页面则该方法不会生效
						});
					}, 1000)
				} else {
					uni.$u.toast(res.info)
				}
			},
			async addculum2() {
				if (this.student_num == '') {
					this.student_num = 0
				}
				if (this.refer_hour_price == '') {
					this.refer_hour_price = 0
				}
				let params = {
					venue_id: [this.venue_id, this.userInfo.occupation_relation_id],
					course_id: this.userInfo.occupation_jineng_id,
					train_ids: [],
					// class_name: this.class_name,
					// train_enum_id: this.train_enum_id,
					absence_deduct: this.selectId1,
					absence_num_warning: this.absence_num_warning,
					assistant_coach_ids: this.coach_nameSelect,
					class_time: this.class_time,
					classroom_id: this.userInfo.occupation_classroom_name_id,
					coach_id: '',
					course_consume_mode: this.jiaoSelect.map(item => [item]),
					leave_deduct: this.selectId2,
					leave_num_waring: this.leave_num_waring,
					max_leave_num: this.max_leave_num,
					not_enough_hour: this.not_enough_hour,
					refer_hour_price: this.refer_hour_price,
					student_num: this.student_num,
					train_ids: this.train_ids
				};
				console.log(params, 'paramsparams')
				let res = await train.cls_mangesave_pi(params);
				if (res.code == 1) {
					uni.$u.toast(res.info)
					setTimeout(() => {
						uni.navigateBack({
							delta: 1 // 返回上一页面，如果页面栈中只有一个页面则该方法不会生效
						});
					}, 1000)
				} else {
					uni.$u.toast(res.info)
				}
			},
			handjiao(item) {
				let data = item.id;
				// 使用indexOf检查是否已选中，避免重复或遗漏
				const index = this.jiaoSelect.indexOf(data);
				if (index > -1) {
					// 如果已选中，则移除
					this.jiaoSelect.splice(index, 1);
				} else {
					// 如果未选中，则添加
					this.jiaoSelect.push(data);
				}
			},
			handcoach_name(item) {
				let data = item.id;
				// 使用indexOf检查是否已选中，避免重复或遗漏
				const index = this.coach_nameSelect.indexOf(data);
				if (index > -1) {
					// 如果已选中，则移除
					this.coach_nameSelect.splice(index, 1);
				} else {
					// 如果未选中，则添加
					this.coach_nameSelect.push(data);
				}
			},
			async cls_options() {
				let params = {
					venue_id: this.venue_id,
				};
				let res = await train.cls_options(params);
				if (res.code == 1) {
					this.occupation_list = res.data.areaList
					this.occupation_status.push(
						this.occupation_list
					)
				}
			},
			async cls_config() {
				let params = {
					venue_id: [this.venue_id, this.userInfo.occupation_relation_id],
				};
				let res = await train.cls_config(params);
				if (res.code == 1) {
					this.jineng_status.push(
						res.data.courseList
					)
					this.trainEnumList = res.data.trainEnumList
					this.weekList = res.data.consumeTypeList
					this.coach_name1_status.push(
						res.data.coachList
					)
					this.coach_nameList = res.data.coachList
					this.coach_name2_status.push(
						res.data.coachList
					)
					this.classroom_name_status.push(
						res.data.classroomList
					)
					if (this.status == 2) {
						const targetClassroom = res.data.classroomList.find(item => item.id == this.assclassroom_id);
						console.log(targetClassroom,'targetClassroom')
						this.userInfo.occupation_classroom_name = targetClassroom.classroom_name
					}
				} else {
					uni.$u.toast(res.info)
				}
			},
			//新增
			addSubTime2() {
				this.subTineList2.push({
					course_item_name: '',
					course_period: '',
					course_price: '',
					week_limit: '7',
					month_limit: '31',
					hour_num: '',
				})
			},
			//删除
			removeSubTime2(indexs) {
				this.subTineList2 = this.subTineList2.filter((item, index) => {
					return index !== indexs
				})
			},
			//新增
			addSubTime() {
				this.subTineList.push({
					course_item_name: '',
					hour_num: '',
					course_price: '',
					course_period: '',
					week_limit: '7',
					month_limit: '31',
					course_extra_num: '',
				})
			},
			//删除
			removeSubTime(indexs) {
				this.subTineList = this.subTineList.filter((item, index) => {
					return index !== indexs
				})
			},

			checkboxChange(n) {},

			baocun() {
				// uni.navigateTo({
				// 	url: '../../page_admin/coach-side/class-home/class-sub/class-add'
				// })
			},
			valChange(e) {},
			shuju() {


			},
			addjineng(e) {
				this.userInfo.occupation_jineng = e.value[0].course_name
				this.userInfo.occupation_jineng_id = e.value[0].id
				this.showjineng = false
			},
			// 职业
			addoccupation(e) {
				this.userInfo.occupation_relation = e.value[0].venue_name
				this.userInfo.occupation_relation_id = e.value[0].id
				this.showoccupation = false
				this.cls_config()
			},
			addcoach_name1(e) {
				this.userInfo.occupation_coach_name1 = e.value[0].coach_name
				this.userInfo.occupation_coach_name_id1 = e.value[0].id
				this.showcoach_name1 = false
			},
			addcoach_name2(e) {
				this.userInfo.occupation_coach_name2 = e.value[0].coach_name
				this.userInfo.occupation_coach_name2_id = e.value[0].id
				this.showcoach_name2 = false
			},
			addclassroom_name(e) {
				this.userInfo.occupation_classroom_name = e.value[0].classroom_name
				this.userInfo.occupation_classroom_name_id = e.value[0].id
				this.showclassroom_name = false
			},

			timeChange(n) {
				this.userInfo.timescount = n
			},
			dataChange(n) {
				this.userInfo.datacount = n
			},
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		width: 100%;
		// height: 100vh;
		background-color: #EDF5F5;
		position: relative;

		.group_3 {
			background-color: rgba(255, 255, 255, 1.000000);
			width: 710rpx;
			height: 100%;
			display: flex;
			flex-direction: column;
			margin: 20rpx 0 0 20rpx;
			border-radius: 20rpx;

			.week-list {
				display: grid;
				grid-template-columns: repeat(5, 1fr);
				grid-gap: 20rpx;
				position: relative;

				.week-item {
					padding: 15rpx 0;
					background-color: rgb(243, 243, 243);
					border-radius: 5rpx;
					text-align: center;
					color: rgb(51, 51, 51);
					font-size: 24rpx;
					font-weight: 500;
					border: solid 2rpx transparent;
					box-sizing: border-box;
				}

				.active {
					color: rgba(255, 98, 0, 1);
					background-color: rgba(255, 65, 5, 0.1);
					// border: solid 2rpx rgb(99, 93, 247);
					position: relative;

					// &:before {
					// 	display: block;
					// 	content: '';
					// 	position: absolute;
					// 	width: 27rpx;
					// 	height: 28rpx;
					// 	right: -2rpx;
					// 	bottom: -2rpx;
					// 	background-image: url("https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/46b1cc85fcb0fd76095daf823b7d2bb4a3235519.png");
					// 	background-repeat: no-repeat;
					// 	background-size: 100%;
					// }
				}

				.active1 {
					color: rgba(255, 98, 0, 1);
					background-color: rgba(255, 65, 5, 0.1);
					// border: solid 2rpx rgb(99, 93, 247);
					position: relative;
				}

				.active2 {
					color: rgba(255, 98, 0, 1);
					background-color: rgba(255, 65, 5, 0.1);
					// border: solid 2rpx rgb(99, 93, 247);
					position: relative;
				}

				.check {
					color: rgb(51, 51, 51);
					font-size: 24rpx;
					position: absolute;
					bottom: 10rpx;
					right: 0;
				}
			}

			.sub-item {
				.item-title {
					width: 45%;
				}

				.bottom {
					position: relative;

					.close {
						position: absolute;
						right: 0;
					}

					.sub-value {
						width: 45%;
						color: rgb(51, 51, 51);
						font-size: 28rpx;
						font-weight: 500;

						.hr {
							margin: 0 16rpx;
						}

						input {
							width: 80rpx;
							padding-right: 20rpx;
						}
					}
				}
			}

			.item {
				// padding: 29rpx 30rpx 30rpx;
				padding: 25rpx 30rpx 20rpx 30rpx;

				.atinput {
					// border: #EBECEE 1rpx solid;
					font-size: 24rpx;
					height: 60rpx;
					width: 600rpx;
					padding-left: 20rpx;
				}

				.item-title {
					color: rgb(153, 153, 153);
					font-size: 28rpx;
					font-weight: 500;
					margin-bottom: 20rpx;
				}

				.value {
					color: rgb(51, 51, 51);
					font-size: 28rpx;
					font-weight: 500;
				}

				.time-cell {
					color: rgb(51, 51, 51);
					font-size: 28rpx;
					font-weight: 500;
					justify-content: flex-start;

					.time {
						width: 49%;

						&:last-of-type {
							margin-left: 20rpx;
						}
					}
				}

				.week-list {
					display: grid;
					grid-template-columns: repeat(5, 1fr);
					grid-gap: 20rpx;
					position: relative;

					.week-item {
						padding: 15rpx 0;
						background-color: rgb(243, 243, 243);
						border-radius: 5rpx;
						text-align: center;
						color: rgb(51, 51, 51);
						font-size: 24rpx;
						font-weight: 500;
						border: solid 2rpx transparent;
						box-sizing: border-box;
					}

					.active {
						color: rgba(255, 98, 0, 1);
						background-color: rgba(255, 65, 5, 0.1);
						// border: solid 2rpx rgb(99, 93, 247);
						position: relative;

						// &:before {
						// 	display: block;
						// 	content: '';
						// 	position: absolute;
						// 	width: 27rpx;
						// 	height: 28rpx;
						// 	right: -2rpx;
						// 	bottom: -2rpx;
						// 	background-image: url("https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/46b1cc85fcb0fd76095daf823b7d2bb4a3235519.png");
						// 	background-repeat: no-repeat;
						// 	background-size: 100%;
						// }
					}

					.active1 {
						color: rgba(255, 98, 0, 1);
						background-color: rgba(255, 65, 5, 0.1);
						// border: solid 2rpx rgb(99, 93, 247);
						position: relative;
					}

					.active2 {
						color: rgba(255, 98, 0, 1);
						background-color: rgba(255, 65, 5, 0.1);
						// border: solid 2rpx rgb(99, 93, 247);
						position: relative;
					}

					.check {
						color: rgb(51, 51, 51);
						font-size: 24rpx;
						position: absolute;
						bottom: 10rpx;
						right: 0;
					}
				}
			}
		}

		.text_2 {
			width: 93rpx;
			height: 23rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 15rpx 0 0 21rpx;
		}

		.section_2 {
			background-color: rgba(229, 229, 229, 1.000000);
			width: 672rpx;
			height: 1rpx;
			display: flex;
			flex-direction: column;
			margin: 40rpx 0 0 18rpx;
		}

		.text_3 {
			width: 47rpx;
			height: 23rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 42rpx 0 0 19rpx;
		}

		.text_4 {
			width: 82rpx;
			height: 26rpx;
			overflow-wrap: break-word;
			color: rgba(51, 51, 51, 1);
			font-size: 28rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 24rpx 0 0 20rpx;
		}

		.section_3 {
			background-color: rgba(229, 229, 229, 1.000000);
			width: 672rpx;
			height: 1rpx;
			display: flex;
			flex-direction: column;
			margin: 40rpx 0 0 18rpx;
		}

		.text_5 {
			width: 47rpx;
			height: 23rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 39rpx 0 0 19rpx;
		}

		.text_6 {
			width: 82rpx;
			height: 26rpx;
			overflow-wrap: break-word;
			color: rgba(51, 51, 51, 1);
			font-size: 28rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 24rpx 0 0 20rpx;
		}

		.section_4 {
			background-color: rgba(229, 229, 229, 1.000000);
			width: 672rpx;
			height: 1rpx;
			display: flex;
			flex-direction: column;
			margin: 40rpx 0 0 18rpx;
		}

		.text_7 {
			width: 95rpx;
			height: 23rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 39rpx 0 0 19rpx;
		}

		.image_2 {
			width: 151rpx;
			height: 151rpx;
			margin: 25rpx 0 0 18rpx;
		}


		.text_8 {
			width: 95rpx;
			height: 23rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 20rpx 0 0 19rpx;
		}

		.text_18 {
			width: 95rpx;
			height: 45rpx;
			overflow-wrap: break-word;
			color: rgba(136, 136, 136, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 5rpx 0 0 19rpx;
		}

		.section_6 {
			width: 378rpx;
			height: 62rpx;
			flex-direction: row;
			display: flex;
			justify-content: space-between;
			margin: 26rpx 0 27rpx 21rpx;
		}

		.button_1 {
			background-color: rgba(243, 243, 243, 1.000000);
			height: 62rpx;
			display: flex;
			flex-direction: column;
			width: 174rpx;
		}

		.text_9 {
			width: 48rpx;
			height: 24rpx;
			overflow-wrap: break-word;
			color: rgba(51, 51, 51, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 19rpx 0 0 63rpx;
		}

		.button_2 {
			background-color: rgba(255, 65, 5, 0.100000);
			height: 62rpx;
			display: flex;
			flex-direction: column;
			width: 174rpx;
		}

		.text_10 {
			width: 73rpx;
			height: 24rpx;
			overflow-wrap: break-word;
			color: rgba(255, 98, 0, 1);
			font-size: 24rpx;
			font-family: PingFang-SC-Medium;
			font-weight: 500;
			text-align: left;
			white-space: nowrap;
			line-height: 34rpx;
			margin: 19rpx 0 0 51rpx;
		}

		.button_3 {
			width: 90%;
			height: 80rpx;
			position: fixed;
			bottom: 20rpx;
			background: linear-gradient(0deg, rgba(214, 53, 53, 0.9), rgba(255, 64, 64, 0.93), rgba(250, 142, 142, 0.93));
			border-radius: 80rpx 80rpx;
			margin-left: 5%;
			color: #fff;
			font-size: 28rpx;
			z-index: 999;
		}
	}

	.scroll-view_H {
		.item {
			margin-bottom: 30rpx;

			.info {
				margin-left: 20rpx;

				.name {
					font-size: 26rpx;
					font-weight: 500;
					color: #333333;
				}

				.phone {
					font-size: 24rpx;
					font-weight: 500;
					color: #bebebe;
					margin-top: 10rpx;
				}
			}
		}

		.checkbox .wx-checkbox-input {
			border-radius: 30upx;
			/* 圆角 */
			width: 30upx;
			/* 背景的宽 */
			height: 30upx;
			/* 背景的高 */
			border: 1px solid #ccc;
			background: #eee;
		}

		/* 复选框禁用样式 */

		.checkbox .wx-checkbox-input-disabled {
			border-radius: 30upx;
			/* 圆角 */
			width: 30upx;
			/* 背景的宽 */
			height: 30upx;
			/* 背景的高 */
			background: #f3f3f3;
			border: 1px solid rgba(201, 201, 201, 1);
		}

		/* 复选框选中后样式 */

		.checkbox .wx-checkbox-input.wx-checkbox-input-checked {
			background: rgba(255, 129, 92, 1);
			border: 1px solid rgba(255, 129, 92, 1);
		}

		/*checkbox选中后图标样式 */

		.checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
			width: 30upx;
			height: 30upx;
			line-height: 30upx;
			text-align: center;
			font-size: 24upx;
			color: #fff;
			background: transparent;
			transform: translate(-50%, -50%) scale(1);
			-webkit-transform: translate(-50%, -50%) scale(1);
		}

		/deep/ checkbox .wx-checkbox-input {
			border-radius: 50% !important;
			color: #ffffff !important;
		}

		/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
			color: #fff;
			background: #2851F3;
		}

		/deep/.wx-checkbox-input.wx-checkbox-input-checked {
			border: none !important;
		}
	}
</style>